﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;


namespace AjaxChat.WebApp
{
    using Maticsoft.DBUtility;
    public class Global : System.Web.HttpApplication
    {

        protected void Application_Start(object sender, EventArgs e)
        {
            int maxCount = (int)DbHelperSQL.Query("select max(msgID) from chatMsg").Tables[0].Rows[0][0];
            Application.Lock();
            Application["maxCount"] = maxCount;
            Application.UnLock();
        }

        protected void Application_End(object sender, EventArgs e)
        {

        }
    }
}